-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write non-breaking space as "~" in LaTeXWriter #2300
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @goerz! Will tag as soon as this is merged.
@goerz It looks like the maintainer access to the PR is not enabled. Do you mind enabling it so that I could push a small additional test? |
I would certainly not mind… but I don't seem to be able to figure out how! |
Documenter changed how non-breaking spaces are written to LaTeX, see JuliaDocs/Documenter.jl#2300 This checks the version of Documenter in the tests, so it works both with old and new versions of Documenter.
I'm pretty sure I've seen that "Allow edits and access to secrets by maintainers" option before on other PRs I've opened, but with Documenter, it's just not there for me, for this PR or for #2330 which I just opened. I have absolutely no idea why. In any case, I've given you write access to my entire goerz-forks/Documenter.jl repo from which I'm opening these PRs, so hopefully that'll be sufficient. |
Ah! It's a Github bug! https://github.com/orgs/community/discussions/5634 I have a |
In DocumenterCitations, non-breaking spaces (
nbsp="\u00A0"
) are used pretty extensively, e.g., in author names ("M.$(nbsp)H.$(nbsp)Goerz"
).Currently, the
LaTeXWriter
leaves these unchanged, so that a unicode non-breaking space ends up in the TeX file. Depending on fonts installed on the user's system and their general LaTeX setup, that doesn't tend to work too well, see JuliaDocs/DocumenterCitations.jl#46 (comment).This PR recognizes
\u00A0
as a character that needs to be "escaped" and replaces it with the standard~
that LaTeX traditionally uses to indicate non-breaking spaces.